<span class="glyphicon glyphicon-map-marker" aria-hidden="true" style="position: absolute; top: 17px; left: 25px;">
    <span>系统</span> /
    <span>安全管理</span> /
    <span>数据库备份记录</span>
</span>
<div style="width: 100%;margin-top: 20px;">
    <div class="table-responsive" style="border:0px solid #fff;">
        <table class="table"  border="1" width="100%" cellpadding="0" cellspacing="0" style="margin: 20px 0px;">
            <tr>
                <th width="5%"  style="height: 35px;">
                    <input type="checkbox" id="ids" onclick="getCheckbox()" />
                </th>
                <th width="5%">ID</th>
                <th width="20%">名称</th>
                <th width="35%">文件名</th>
                <th width="20%">创建时间</th>
                <th width="">操作</th>
            </tr>
            {volist name="list" id="vo"}
            <tr>
                <th>
                    <input type="checkbox" name="ids[]" onclick="getCheckboxByIds({$vo.id})" id="ids-{$vo.id}" value="{$vo.id}" />
                </th>
                <td>{$vo.id}</td>
                <td>{$vo.name}</td>
                <td>{$vo.file}条</td>
                <td>{$vo.create_time}</td>
                <td>
                    <a name="edit" title="下载" class="btn edit-btn"
                       href="{:url('Admin/Backups/download',array('id'=>$vo.id))}">下载</a>
                    <a name="delete" title="删除" class="btn delete-btn" id="operation{$vo.id}"
                       onclick="Delete('{$vo.id}')">删除</a>
                </td>
            </tr>
            {/volist}
        </table>
        {$list->render()}
    </div>
</div>
<script type="text/javascript">
    function Delete(id) {
        layer.confirm('请确认是否删除', {
            icon: 3,btn: ['确认','取消'] //按钮
        }, function(){
            $.ajax({
                type:"post",
                url:"{:url('Admin/Backups/Delete')}",
                data:{
                    "id":id
                },
                success:function (res) {
                    layer.msg(res);
                    setTimeout('Backups()',3000);
                }
            })
        }, function () {
            layer.msg('取消操作');
        });
    }
    function Backups() {
        window.location.href="{:url('Admin/Backups/Index')}";
    }
</script>